from django.conf.urls import url, include
from thdata import views as vic

urlpatterns = [
    # 第二階段新街口

    # 氣壓接口
    url(r'^ps_nav/$', vic.ps_nav, name='氣壓導航'),
    url(r'^pressure/$', vic.pressure, name='氣壓數據'),

    # 溫濕度接口
    url(r'^th_nav/$', vic.th_nav, name='溫濕度導航'),
    url(r'^th_state/$', vic.th_state, name='溫濕度實時趨勢'),
    url(r'^th_se_state/$', vic.th_se_state, name='溫濕度實時'),
    url(r'^tem_state_day/$', vic.tem_state_day, name='溫度趨勢BY天'),
    url(r'^hum_state_day/$', vic.hum_state_day, name='濕度趨勢BY天'),
    url(r'^th_total/$', vic.th_total, name='各車間氣壓監控點數'),
    url(r'^th_defect_top/$', vic.th_defect_top, name="車間溫濕度異常TOP"),
    url(r'^th_detail/$', vic.th_detail, name="各車間溫濕度詳情"),
    url(r'^th_defect_detail/$', vic.th_defect_detail, name="各車間異常詳情"),

    # 設備運行狀態
    url(r'^format_gantt/$', vic.format_gantt, name='處理甘特圖數據'),
    url(r'^machine_nav/$', vic.machine_nav, name='設備運行狀態導航'),
    url(r'^machine_gantt/$', vic.machine_gantt, name='甘特圖'),
    url(r'^machine_trend/$', vic.machine_trend, name='稼動率趨勢'),
    url(r'^machine_forms/$', vic.machine_forms, name='稼動率報表'),

    # 能耗監控
    url(r'^watt_nav/$', vic.watt_nav, name='能耗導航'),
    url(r'^watt_state/$', vic.watt_state, name='能耗實時界面'),
    url(r'^watt_forms1/$', vic.watt_forms1, name='能耗報表'),
    url(r'^total_energy1/$', vic.total_energy1, name='能耗總量'),
    url(r'^energy_ternd1/$', vic.energy_trend1, name='能耗趋势图'),
    url(r'^energy_id1/$', vic.energy_id1, name='能耗By机台'),
    url(r'^energy_top/$', vic.energy_top, name='能耗TOP'),

    # 實時看板
    url(r'^machine_board/$', vic.machine_board, name='設備佔比'),
    url(r'^th_board/$', vic.th_board, name='溫濕度看板'),
    url(r'^watt_board/$', vic.watt_board, name='能耗看板'),
    url(r'^layout_board', vic.layout_board, name='3D三色燈'),
    url(r'^layout_activation', vic.layout_activation, name='3D稼動率'),
    # 异常统计

    url(r'^defect_nav/$', vic.defect_nav, name='异常导航'),
    url(r'^defect_total/$', vic.defect_total, name='异常总览'),
    url(r'^defect_status/', vic.defect_status, name='異常處理詳情'),
    url(r'^defect_forms/$', vic.defect_forms, name='异常表报'),
    url(r'^defect_mat/(?P<pk>[0-9]+)/$', vic.defect_mat, name='異常處理'),
    url(r'^defect_top/$', vic.defect_top, name='异常TOP5'),
    url(r'^defect_ternd/$', vic.defect_ternd, name='异常趋势'),

    # 新增設備運行狀態
    url(r'^machine_top/$', vic.machine_top, name='設備狀態TOP5'),
    url(r'^state_detail/$', vic.state_detail, name='設備狀態詳情'),
    url(r'^machine_total/$', vic.machine_total, name='各車間設備總數'),
    url(r'^se_state/$', vic.se_state, name='各車間停機數量'),
    url(r'^machine_gantt1/$', vic.machine_gantt1, name='單個設備甘特圖'),

    # 全球界面和樓層界面
    url(r'^global_kpi/$', vic.global_kpi, name='廠區界面各指標'),
    url(r'^site_jdl/$', vic.site_jdl, name='site 稼動率'),
    url(r'^site_watt/$', vic.site_watt, name='site 能耗'),
    # New氣壓界面
    url(r'^pressure_total/$', vic.pressure_total, name="各車間氣壓點數"),
    url(r'^pre_state/$', vic.pre_state, name="各車間氣壓情況"),
    url(r'^pre_defect_cot/$', vic.pre_defect_cot, name="氣壓異常TOP"),
    url(r'^pre_detail/$', vic.pre_detail, name='車間各氣壓詳情'),

    # New 能耗接口
    url(r'^energy_trend/$', vic.energy_trend, name='能耗趋势图'),
    url(r'^energy_normal_top/$', vic.nomral_top, name='正常能耗TOP'),
    url(r'^se_energy/$', vic.se_energy, name='各車間能耗'),
    url(r'^se_energy_trend/$', vic.se_energy_trend, name='能耗趨勢圖'),
    url(r'^total_energy/$', vic.total_energy, name='車間總能耗'),
    url(r'^pro_energy/$', vic.pro_energy, name='各品牌排行'),
    url(r'^energy_ex_top/$', vic.energy_ex_top, name='損失能耗排行'),
    url(r'^pro_trend/$', vic.pro_trend, name="品牌趨勢圖"),
    url(r'^energy_id/$', vic.energy_id, name='異常能耗By机台'),
    url(r'^watt_forms/$', vic.watt_forms, name='能耗報表'),

    # 設備履歷
    url(r'^resume/$', vic.resume, name='設備履歷'),
    url(r'^repair_msg/$', vic.repair_msg, name='維修明細'),
    url(r'^resume_watt/$', vic.resume_watt, name='設備履歷能耗'),

    #設備信息管理
    url(r'^device_nav/$', vic.device_nav, name="設備信息管理導航"),
    url(r'^use_top/$', vic.use_top, name="設備使用年限TOP5"),
    url(r'^use_brand/$', vic.use_brand, name="品牌使用年限"),
    url(r'^use_total/$', vic.use_total, name="总设备年限分类"),
    url(r'^use_detail/$', vic.use_detail, name="使用年限詳細清單"),

]
